<%
	/* Connection 对象 */
		var Connection=Class.create();
			Connection.prototype=
			{
			
			};
	/* Recordset 对象 */
		var Recordset=Class.create();
			Recordset.prototype=
			{
			
			};		
	/* Command 对象 */
		var Command=Class.create();
			Command.prototype=
			{
				initialize:function($options)
				{
					this.obj=Server.CreateObject('ADODB.Command');
					this.loadOptions($options);
					this.loadProperties();
					this.loadMethod();
				},	
				loadOptions:function($options)
				{
					this.options=
					{
						connectionType:'in',
						connectionObject:null
					};
					Object.extend(this.options,$options);
					if(this.options.connectionType=='out')
					{						
						this.obj.ActiveConnection=this.options.connectionObject;
					}
					else
					{
						//内建
						this.obj.ActiveConnection=(new Connection()).obj;
					}					
				},
				loadProperties:function()
				{
					Object.extend(this.obj,
					{
						activeConnection:this.obj.ActiveConnection,
						commandText:this.obj.CommandText,
						commandTimeout:this.obj.CommandTimeout,
						commandType:this.obj.CommandType,
						parameters:this.obj.Parameters,
						prepared:this.obj.Prepared,
						properties:this.obj.Properties,
						state:this.obj.State,
						name:this.obj.Name		
					});					
				},		
				loadMethod:function()
				{
					Object.extend(this,
					{	
						cancel:function()
						{
							this.obj.Cancel();
						},	
						createParameter:function($name,$type,$direction,$size,$value)
						{
							return this.obj.CreateParameter($name,$type,$direction,$size,$value);
						},						
						execute:function($recordCount,$parameters,$options)
						{
							return this.obj.Execute($recordCount,$parameters,$options);
						}					
					});					
				},
				close:function()
				{
					for(var commProperties in this)
					{
						this[commProperties]=null;
					}
				}				
			};
	/* Stream 对象 */
		var Stream=Class.create();
			Stream.prototype=
			{
			
			};		
%>